/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.sunspotworld.protocols;

import com.sun.spot.peripheral.radio.IProtocolManager;
import com.sun.spot.peripheral.radio.LowPanHeaderInfo;
import com.sun.spot.util.IEEEAddress;
import org.sunspotworld.datawrappers.DataWrapperVector;

/**
 *
 * @author me
 */
public class BeaconProtocol implements IProtocolManager {
    public static final byte PROTOCOL_NUM = MyProtocols.BEACON;
    
    public void processIncomingData(byte[] arg0, LowPanHeaderInfo arg1) {
        System.out.println("Beacon Received: " + new IEEEAddress(arg1.sourceAddress).asDottedHex());
        DataWrapperVector.getInstance().addAddress(arg1.sourceAddress);
    }

}
